home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9296 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: ix.netcom.com!netnews
  2. From: miker3@ix.netcom.com (Mike Rubenstein)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Is there a standard for * and & placement style?
  5. Date: Thu, 29 Feb 1996 20:46:40 GMT
  6. Organization: Netcom
  7. Message-ID: <313606fa.87475142@nntp.ix.netcom.com>
  8. References: <3128BD31.4AF8@wildfire.com> <marnoldDn27q9.Is0@netcom.com> <4gckd5$bc7@clarknet.clark.net> <marnoldDn63vB.H6n@netcom.com> <4gihqq$1s9@ns1.arlut.utexas.edu> <4gv9nk$4p2@alpha.it.net>
  9. NNTP-Posting-Host: ix-dc12-23.ix.netcom.com
  10. X-NETCOM-Date: Thu Feb 29 12:46:40 PM PST 1996
  11. X-Newsreader: Forte Agent .99d/32.182
  12.  
  13. gema001@pn.itnet.it (Antonio Romeo) wrote:
  14.  
  15. > >...
  16. > >-- use intelligent variable names
  17. > >...
  18. > a bit more on this:
  19. > intelligent variables names are meaningfull names.
  20. > So 
  21. >     int i; /* loop counter */
  22. >     ...
  23. >     for (i=0;i<MAX; i++)
  24. >         MakeOnArray(arrayname[i]);
  25. >     ...
  26. > does not is a good name. In a loop, i is the current processed element
  27. > of an array, the next or the previous? 
  28. >  Another good practice is to not make
  29. > assumption on variable values after al loop, expecialli in a FOR
  30. > statement. This is true for every language I know. The variable value
  31. > after a loop depend on compiler (not language) decision.
  32.  
  33. Not true.  There are languages (C and C++ leap to mind) that define
  34. the value of a loop variable after the end of the loop.
  35.  
  36.  
  37. Michael M Rubenstein
  38.